package com.ruoyi.operation.service.impl;

import com.ruoyi.operation.domain.*;
import com.ruoyi.operation.mapper.TradeingActivityMapper;
import com.ruoyi.operation.service.TradeingActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TradeingActivityServiceImpl implements TradeingActivityService {

    @Autowired
    TradeingActivityMapper tradeingActivityMapper;

    @Override
    public List<TradingActivity> getTradeingActivityType(String type) {
        if ("MONTH".equals(type)) {
            return tradeingActivityMapper.getTradeingActivityTypeByMonth();
        }
        if ("HOUR".equals(type)) {
            return tradeingActivityMapper.getTradeingActivityTypeByHour();
        }


        return null;
    }

    @Override
    public List<PayWayWIthNum> getPayWayNum() {
        return tradeingActivityMapper.getPayWayNum();
    }

    @Override
    public List<MonthPrice> getMonthPrice(String type) {

        if ("CONSUMER".equals(type)) {
            return tradeingActivityMapper.getMonthConsumerPriceList();
        }
        if ("REPAYMENT".equals(type)) {
            return tradeingActivityMapper.getMonthepayRepaymentPriceList();

        }
        return null;
    }

    @Override
    public List<MechanismUseNum> getMechanismUseNumList() {
        return tradeingActivityMapper.getMechanismUseNumList();
    }

    @Override
    public List<PlatformStatus> getPlatformStatusList() {
        return tradeingActivityMapper.getPlatformStatusList();
    }

    @Override
    public List<MonthApply> getMonthApplyList() {
        return tradeingActivityMapper.getMonthApplyList();
    }

    @Override
    public List<MonthApply> getMonthRefuseList() {
        return tradeingActivityMapper.getMonthRefuseList();
    }

    @Override
    public List<PlatformSumCount> getPlatformSumCountList() {
        return tradeingActivityMapper.getPlatformSumCountList();
    }

    @Override
    public List<PlatformStatus> getLoanStautsList() {
        return tradeingActivityMapper.getLoanStautsList();
    }

    @Override
    public List<PlatformStatus> getRepayStautsList() {
        return tradeingActivityMapper.getRepayStautsList();
    }

    @Override
    public List<PlatformSumCount> getRepayPlatformSumList() {
        return tradeingActivityMapper.getRepayPlatformSumList();
    }

    @Override
    public List<MonthNumApply> getRepayPlatformMonthNumSumList() {
        return tradeingActivityMapper.getRepayPlatformMonthNumSumList();
    }

    @Override
    public List<UserInfo> getUserInfoList() {
        return tradeingActivityMapper.getUserInfoList();
    }

    @Override
    public List<TotalOutPut> getTotalOutputList() {
        return tradeingActivityMapper.getTotalOutputList();
    }
}
